﻿using System.Collections.Generic;
using Yu.Cms.DALFactory;
using Yu.Cms.IDAL;
using Yu.Enum;
namespace Yu.Cms.BLL
{
    public class BigType
    {
        private readonly IBigType dal = DataAccess.CreateBigType();

        /// <summary>
        /// 获取所有栏目数
        /// </summary>
        /// <returns></returns>
        public int GetMaxCount()
        {
            return dal.GetMaxCount();
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Yu.Cms.Model.BigType model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public int Update(Yu.Cms.Model.BigType model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public int Delete(int BigTypeID)
        {
            return dal.Delete(BigTypeID);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Yu.Cms.Model.BigType GetModel(int BigTypeID)
        {
            return dal.GetModel(BigTypeID);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public IList<Yu.Cms.Model.BigType> GetList()
        {
            return dal.GetList();
        }

       
        /// <summary>
        /// 排序
        /// </summary>
        /// <param name="model"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        public bool SortBigType(Yu.Cms.Model.BigType model , Yu.Enum.Sort sort)
        {
            return dal.SortBigType(model, sort);
        }

        

    }
}
